package snow

import (
	"github.com/bwmarrin/snowflake"
)

var node *snowflake.Node

func Setup(nodeID int64) {
	var err error
	node, err = snowflake.NewNode(nodeID)
	if err != nil {
		panic(err)
	}
}

func Node() *snowflake.Node {
	return node
}

func Generate() snowflake.ID {
	return node.Generate()
}
